* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
}

/* 顶部广告 */
.top-ad {
    height: 40px;
    background-color: #ff6600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航条 */
.nav-bar {
    height: 60px;
    background-color: #333;
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* 主内容容器 - 左右布局 */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
}

/* 左侧轮播图 */
.slider-container {
    flex: 2;
    min-height: 400px;
    background-color: #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 右侧最新热点 */
.hot-news-container {
    flex: 1;
    min-height: 400px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}
.back-to-top.visible {
    opacity: 1;
}

/* 响应式设计 - 小于768px时改为上下布局 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .slider-container,
    .hot-news-container {
        flex: none;
        width: 100%;
    }
}
nav {
    background-color: #333;
    overflow: hidden;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    float: left;
}

nav ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

nav ul li a:hover {
    background-color: #111;
}

.image-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.image-container img {
    width: 100%;
    height: 400px;
    transition: height 5s ease;
}

.image-container button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 20px;
    cursor: pointer;
}
#backToTopButton {
    display: none; /* 默认隐藏 */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 32px; /* 增加图标的大小 */
    border: none;
    outline: none;
    background: linear-gradient(45deg, #ff6b6b, #f44336); /* 背景颜色渐变 */
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%; /* 将按钮变为圆形 */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s, filter 0.3s; /* 添加filter过渡效果 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
    filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.5)); /* 添加光效 */
    animation: rotate 2s linear infinite; /* 添加旋转动画 */
}

#backToTopButton:hover {
    background: linear-gradient(45deg, #f44336, #ff6b6b); /* 鼠标悬停时改变渐变方向 */
    transform: scale(1.1); /* 鼠标悬停时放大图标 */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* 鼠标悬停时增加阴影 */
    filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.7)); /* 鼠标悬停时增强光效 */
}

/* 定义旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}